home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 March / EnigmA AMIGA RUN 35 (1999)(G.R. Edizioni)(IT)[!][issue 1999-03].iso / earcd / misc / pdflib / bindings / perl / hello.pl next >
Perl Script  |  1999-01-01  |  486b  |  22 lines

  1. #!/usr/bin/perl
  2.  
  3. use pdflib;
  4. package pdflib;
  5.  
  6. $fp = fopen("hello_perl.pdf", "w");
  7. $ip = PDF_get_info();
  8. $ip->{Creator} = "hello.pl";
  9. $ip->{Author} = "RJS";
  10. $ip->{Title} = "Hello world (Perl)";
  11. $ip->{fontpath} = "../../fonts";
  12.  
  13. $p = PDF_open($fp, $ip);
  14.  
  15. PDF_begin_page($p, $a4->{width}, $a4->{height});
  16. PDF_set_font($p, "Helvetica-Bold", 18.0, $winansi);
  17. PDF_set_text_pos($p, 50, 700);
  18. PDF_show($p, "Hello world!");
  19. PDF_continue_text($p, "(says Perl)");
  20. PDF_end_page($p);
  21. PDF_close($p);
  22.